#include <iostream>
#include <memory>
using namespace std;

class Car;

class Person
{
public:
    Person()
    {
        cout << "Perdon()" << endl;
    }

    void run()
    {
        cout << "run()" << endl;
    }

    ~Person()
    {
        cout << "~Perdon()" << endl;
    }
public:
    

};


int main()
{
    {
        unique_ptr<Person> p1(new Person);
        #if 0
        unique_ptr<Person> p2 = p1;
        unique_ptr<Person> p2(p1);
        #else
        unique_ptr<Person> p2 = std::move(p1);
        p2->run();

        p1->run();
        #endif

        // /* 适用于数组*/
        // unique_ptr<Person[]> p1(new Person[3]{});
    }

    return 0;
}